home *** CD-ROM | disk | FTP | other *** search
- Path: dish.news.pipex.net!pipex!dircon!usenet
- From: Kai Chan <kai@cell.co.uk>
- Newsgroups: comp.lang.c
- Subject: === **ptr HELP ===
- Date: Thu, 18 Apr 1996 16:07:18 +0100
- Organization: Direct Connection
- Message-ID: <31765AA6.41C6@cell.co.uk>
- NNTP-Posting-Host: cell.co.uk
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (X11; I; IRIX 5.3 IP22)
-
- Hi,
- I've got the following code fragment. Question I've got concerns
- passing the pointer to a pointer to func1, and that is: which is
- correct?
-
- blar...
- blar...
-
- main()
- {
- some_type1 **ptr;
-
- func1(ptr); /* is this right? */
- func1(&ptr); /* or this? */
- func1(**ptr); /* or this? */
- func1(*ptr); /* or this? */
-
- }
-
- func1(some_type1 **ptr)
- {
- blar...
- blar...
- }
-
- Thanx in advance.
- Kai
-
- --
- *:(*:(*:(*:(*:(*:(*:(*:(*:(*:(*:(*:(
- Kai Chan [ kai@cell.co.uk ]
- Cell 59-61 Charlotte St
- London W1P 1LA
- 0171-2081500
- *:)*:)*:)*:)*:)*:)*:)*:)*:)*:)*:)*:)
-